//*************************************************************************************************
//Copyright (c) 2015.year. @hjjer.
//If you are a hjjer(hejianjiao.org), This code is unlicensed, otherwise,is licensed under the GPL.
//*************************************************************************************************

package com.truthbean.ssm.demo.persistence;

import com.truthbean.ssm.demo.domain.entity.Enroll;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Truthbean
 * @since 2015-12-17 19:33:04
 */
public interface EnrollMapper {

    int save(Enroll enroll);

    int updateArea(@Param("newArea") String newArea,
                   @Param("oldArea") String oldArea);

    int deleteEnroll(@Param("enrollArea") String enrollArea);

    int updateYear(@Param("oldYear") String oldYear,
                   @Param("enrollArea") String enrollArea,
                   @Param("newYear") String newYear);

    int addYear(@Param("enrollArea") String enrollArea,
                @Param("newYear") String newYear);

    List<String> queryYearsOverPage(@Param("begin") int begin,
                                    @Param("size") int size);

    List<String> queryAllYears();

    List<String> queryAreasOverPage(@Param("begin") int begin,
                                    @Param("size") int size);

    List<String> queryAllAreas();

    String queryYearByArea(@Param("area") String area);

    int batchDeleteEnroll(List<String> area);

    int batchDeleteYear(@Param("areas") List<String> area, @Param("year") String year);

    int batchAddYear(@Param("list") List<String> enrollArea, @Param("newYear") int newYear);

    List<Enroll> queryEnrollOverPage(@Param("begin") int begin,
                                     @Param("size") int size);

    List<Enroll> queryAll();

    int countEnroll();

    boolean isAreaExist(@Param("area") String area);
}
